package TemplateMethod;

public class CharDisplay extends AbstractDisplay {
    public char ch;
    public CharDisplay(char ch)
    {
        this.ch=ch;
    }//实现AbstractDisplay的抽象方法才是具体的类，不然要加abstract
    public void open(){
        System.out.println("<<");
    }
    @Override
    public void print() {
        System.out.println(ch);
    }
    public void close(){
        System.out.println(">>");
    }
}
